package com.molyfun.parents.activity.common;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.molyfun.parents.R;
import com.molyfun.parents.fragment.BaseFragment;
import com.molyfun.parents.fragment.dialog.OrigiationEnterFragment;

/**
 * Created by william(liuchao.hit@gmail.com).
 * Date:12/30/16.
 */
public abstract class BaseMainTabFragment extends BaseFragment {


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

        LinearLayout view = (LinearLayout) inflater.inflate(R.layout.layout_user_not_enter, container, false);
        (view.findViewById(R.id.add_organization)).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                new OrigiationEnterFragment.OrigiationEnterDialogBuilder()
                        .build(getChildFragmentManager().beginTransaction());

            }
        });
        (view.findViewById(R.id.apply_for_organization)).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                new OrigiationApplyFragment.OrigiationApplyDialogBuilder()
//                        .build(getChildFragmentManager());
//                SignUpStartActivity.startActivity(getContext());
//                OrganizationEnterActivity.startActivity(getActivity());
            }
        });
        return view;
    }

    public abstract void onParentClickTab();

}
